import request from '@/utils/request'

export function submit(data) {
  return request({
    url: 'buss/entryexitregistration/add',
    method: 'post',
    data
  })
}

export function getOne(id) {
  return request.get('buss/entryexitregistration/getOne?id='+id)
}

export function getTablePage(data) {
  return request.post('buss/entryexitregistration/listPage', data)
}

export function getContractSectList(data) {
  return request.post('buss/entryexitregistration/getContractSectList', data)
}

export function del(ids) {
  return request({
    url: 'buss/entryexitregistration/del',
    method: 'post',
    data: ids
  })
}

export function resubmit(data) {
  return request({
    url: 'buss/entryexitregistration/edit',
    method: 'post',
    data
  })
}

export function getCompanyName(data) {
  return request.post('buss/entryexitregistration/getCompanyName', data)
}

export function editDate(data) {
  return request.post('buss/entryexitregistration/editDate', data)
}

export function exportExcel(data) {
  return request({
    method: 'post',
    url: 'buss/entryexitregistration/exportExcel',
    data: data,
    responseType: 'blob'
  })
}

export function downfile(data,name) {
  return request({
    method: 'post',
    url: 'buss/entryexitregistration/downfile?name=' + name,
    data: data,
    responseType: 'blob'
  })
}

export function importExcel(data) {
  return request.post('buss/entryexitregistration/importExcel', data)
}

export function getPeopleNum(data) {
  return request.post('buss/entryexitregistration/getPeopleNum', data)
}

export function getBulletinBoard(data) {
  return request.post('buss/entryexitregistration/getBulletinBoard', data)
}

export function getSpecialTypeTable(data) {
  return request.post('buss/entryexitregistration/getSpecialTypeTable', data)
}

export function getPostList(data) {
  return request.post('buss/entryexitregistration/getPostList', data)
}

export default {
  submit,
  getOne,
  del,
  resubmit,
  getTablePage,
  getContractSectList,
  getCompanyName,
  editDate,
  exportExcel,
  downfile,
  importExcel,
  getPeopleNum,
  getBulletinBoard,
  getSpecialTypeTable,
  getPostList
}
